//
//  ViewController.m
//  UI06_homework
//
//  Created by dllo on 16/6/13.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "ViewController.h"
#import "ScrollView.h"
#import "IdiotView.h"
@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self creatSmallScroll];
    
    [self creatBigScroll];
}

-(void)creatSmallScroll{
    
    ScrollView *text = [[ScrollView alloc]initWithFrame:CGRectMake(0, 0, 200, 300) withPictureName:@"luo.jpg"];
    [self.view addSubview:text];
    [text release];
    
}

-(void)creatBigScroll{
    
    IdiotView *bigScroll = [[IdiotView alloc]initWithFrame:CGRectMake(50, 200, 300, 350)];
    [self.view addSubview:bigScroll];
    [bigScroll release];
    
    ScrollView *one = [[ScrollView alloc]initWithFrame:CGRectMake(50, 50, 250, 300) withPictureName:@"nami.jpg"];
    ScrollView *two = [[ScrollView alloc]initWithFrame:CGRectMake(50, 50, 250, 300) withPictureName:@"equeye.jpg"];
    ScrollView *three = [[ScrollView alloc]initWithFrame:CGRectMake(50, 50, 250, 300) withPictureName:@"buluke.jpg"];
    bigScroll.imagesArray = @[one, two, three];
    
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
